import request from '@/utils/request'

// 创建课程收藏
export function createCourseCollect(data) {
  return request({
    url: '/exam/course-collect/create',
    method: 'post',
    data: data
  })
}

// 更新课程收藏
export function updateCourseCollect(data) {
  return request({
    url: '/exam/course-collect/update',
    method: 'put',
    data: data
  })
}

// 删除课程收藏
export function deleteCourseCollect(id) {
  return request({
    url: '/exam/course-collect/delete?id=' + id,
    method: 'delete'
  })
}

// 获得课程收藏
export function getCourseCollect(id) {
  return request({
    url: '/exam/course-collect/get?id=' + id,
    method: 'get'
  })
}

// 获得课程收藏分页
export function getCourseCollectPage(query) {
  return request({
    url: '/exam/course-collect/page',
    method: 'get',
    params: query
  })
}

// 导出课程收藏 Excel
export function exportCourseCollectExcel(query) {
  return request({
    url: '/exam/course-collect/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
